package sigeco.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Knowledge Class.
 * 
 * Represents and Knwoledge Area for which a person may have a Competency 
 * give a related Ability.
 * 
 * @author julien
 */
@Entity
@Table(name = "knowledges")
public class Knowledge {
	
	private String name;
	private KnowledgeGroup knowledgeGroup;
	private long id;
	
	@ManyToOne(optional = false)
	public KnowledgeGroup getKnowledgeGroup() {
		return this.knowledgeGroup;
	}
	public void setKnowledgeGroup(final KnowledgeGroup knowledgeGroup) {
		this.knowledgeGroup = knowledgeGroup;
	}
	
	@Column(nullable = false)
	public String getName() {
		return this.name;
	}
	public void setName(final String name) {
		this.name = name;
	}
	
	@Id
	@GeneratedValue
	public long getId() {
		return this.id;
	}

	public void setId(final long id) {
		this.id = id;
	}
	
}
